<?php

declare(strict_types=1);

namespace App\Command;

use Hyperf\Command\Command as HyperfCommand;
use Hyperf\Command\Annotation\Command;
use Psr\Container\ContainerInterface;
use Service\ConsumerService\PushUserGoodsMessageService;

/**
 * @Command
 */
class PushBBCUserGoodsMessageCron extends HyperfCommand
{
    /**
     * @var ContainerInterface
     */
    protected $container;

    public function __construct(ContainerInterface $container)
    {
        $this->container = $container;

        parent::__construct('PushBBCUserGoodsMessageCron');
    }

    public function configure()
    {
        parent::configure();
        $this->setDescription('协程同步BBC商品推送消息逻辑');
    }

    public function handle()
    {
        PushUserGoodsMessageService::instance()->queryBbcGoodsMessage();
    }
}
